<{include file="dcenter/block/header.html"}>
<div class="ucenter_t">
    <ul><li class="on">添加工地</li></ul>
    <span class="r"><a href="<{link ctl='dcenter/gz/site:index'}>" class="pbtn">工地管理</a></span>
</div>
<div class="ucenter_c">
<{if $group.priv.allow_site < 0}>
    <p class="tips"><span class="lock">您是【<b class="red"><{$group.group_name}></b>】没有权限添加在建工地</span></p>
<{elseif $group.priv.allow_site == 0}>
    <p class="tips"><span class="notice">您是【<b class="red"><{$group.group_name}></b>】添加在建工地需要审核</span></p>
<{/if}>
<form action="<{link ctl='dcenter/gz/site:create'}>" mini-form="ucenter-form" method="post" ENCTYPE="multipart/form-data">
<table cellspacing="0" cellpadding="0" class="form"
    <tr><th><span class="red">*</span>标题：</th><td><input type="text" name="data[title]" value="<{$detail.title|default:''}>" class="input w-300"/></td></tr>    
    <tr><th class="w-100">地区：</th>
        <td><b class="blue"><{$gz.city_name}></b>&nbsp;&nbsp;&nbsp;
            <select name="data[area_id]" class="select w-150"><{widget id="data/area" value=$detail.area_id city_id=$gz.city_id}></select>
        </td>
    </tr>
    <tr><th>面积：</th><td><input type="text" name="data[house_mj]" value="<{$detail.house_mj}>" class="input w-200" /><span class="tip-comment">平米</span></td></tr>
    <tr><th>造价：</th><td><input type="text" name="data[price]" value="<{$detail.price}>" class="input w-200" /><span class="tip-comment">万元</span></td></tr>
    <tr><th>小区：</th>
        <td>
            <input type="hidden" name="data[home_id]" id="select_home_id" value="0"/>
            <input type="text" readonly id="select_home_name" name="data[home_name]" value="<{$detail.home_name}>" class="input"/>
            <a class="pbtn" action="<{link ctl='ucenter/misc/select:home' arg0=$pager.city_id}>" mini-select="#select_home_id,#select_home_name/N/<{$gz.city_id}>/选择小区"/>选择小区</a><br />
        </td>
    </tr>   
<tr><th>装修案例：</th>
    <td>
        <input type="hidden" name="data[case_id]" value="0" id="case_case_id"/>
        <input type="text"  value="" id="case_case_title" class="input w-300" readonly="readonly"/>
         <a class="pbtn" action="<{link ctl='ucenter/misc/select:mycase'}>" mini-select="#case_case_id,#case_case_title/N/<{$gz.city_id}>/选择装修案例"/>选择装修案例</a><br />    
    </td>
</tr>
<tr><th>百度地图：</th>
	<td>
		<label>经度:<input type="text" name="data[lng]" value="<{$detail.lng|default:''}>" id="Bmap_marker_lng" class="input w-100"/></label>
		<label>纬度:<input type="text" name="data[lat]" value="<{$detail.lat|default:''}>" id="Bmap_marker_lat" class="input w-100"/></label>	
		<span class="tip-comment"><a map-marker="#Bmap_marker_lng,#Bmap_marker_lat" class="pbtn"><b>拾取工具</b></a></span>
	</td>
</tr>
    <tr><th><span class="red">*</span>缩略图：</th><td><input type="file" name="thumb" class="input w-300" /></td></tr>
    <tr><th>地址：</th><td><input type="text" name="data[addr]" value="<{$detail.addr|default:''}>" class="input w-500"/></td></tr>
    <tr><th>工地简介：</th><td><textarea name="data[intro]" class="textarea w-500"><{$detail.intro}></textarea><br /></td></tr>
    <tr><th></th><td><{if $group.priv.allow_site<0}><input type="button" value="没有权限" disabled="disabled" class="mpbtn" /><{else}><input type="submit" value="提交数据" class="green_btn" /><{/if}></td></tr>
</table>
</form>
</div>
<script type="text/javascript" src="<{$pager.res}>/script/widget.bmap.js"></script>
<{if $group.priv.allow_site < 0}>
<script type="text/javascript">
(function(K, $){
$("[mini-form] input,[mini-form] select,[mini-form] textarea").attr("disabled", "disabled");
})(window.KT, window.jQuery);
</script>
<{/if}>
<{include file="dcenter/block/footer.html"}>